package STUDENT.TRINHQUANGXUANDUC.OPPS.baitapmang.bai4;

public class Models {
	public String findInDex(int[] array) {
		String index = "";
		String min = "", max = "";
		int b1 = 0, b2 = 0;
		for (int i = 0; i < array.length; i++) {
			if (b1 < array[i]) {
				b1 = array[i];
				min += b1 + "[" + i + "],";
			}
			if (b2 > array[i]) {
				b2 = array[i];
				max += b2 + "[" + i + "],";
			}
		}
		index = "Nho nhat la: " + max + "Lon nhat la: " + min;
		return index;
	}
}
